/**
  ETFDAQ Project
  \brief a map of card types and their enum values
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2024-08-15
  \date 2024-08-15 last modified

  \copyright Copyright (c) 2024 IMP-CAS with LGPLv3 LICENSE
*/

#ifndef card_type_h
#define card_type_h

#include <string>
#include <unordered_map>

enum class ECardType : int{
  UDF = 0,
  // vxxx: caen cards, 'N' suffix: NIM input //
  v785N, v785, // ADC
  v1290A, // multi-hit TDC
  v830, // scaler
  v895, // LED (Leading-Edge Discriminator)
  v792N, v965, // QDC; v965: dual range
  // mxxx: mesytec cards, xxx-dd: dd is nof input chs //
  mADC32, // ADC
  mTDC32 // TDC
};

const std::unordered_map<std::string, ECardType> gCardMap = {
  {"v785N", ECardType::v785N}, {"v785", ECardType::v785},
  {"v1290A", ECardType::v1290A},
  {"v830", ECardType::v830},
  {"v895", ECardType::v895},
  {"v792N", ECardType::v792N}, {"v965", ECardType::v965},

  {"mADC32", ECardType::mADC32},
  {"mTDC32", ECardType::mTDC32}
};

enum class ECardPurpose : int{
  UDF = 0,
  ADC, TDC, QDC, SCALER, LED
};

#endif
